"""
    MakeCase for Auto Api test cases structures.
    print xxx.yml, test_xxx.py, xxx_api.py and create them if not exist
    通过请求地址，请求参数，请求方法3个参数，自动创建参数化yml文件，接口封装xxx_api.py文件，test_xxx.py用例文件
"""
from temp import Temp

path = "/open-apis/contact/v3/departments/search"
# data = {"orderId": 1928, "zwyInputBtnFlag": 1}
payload = {
	"query": "DemoName",
	"id": "1"
}
# payload1 = json.dumps(payload, indent=2, ensure_ascii=False)
# func = path.split('/')[-1], ob=path.split('/')[-2]
func = 'search_department'
method = 'POST'
mc = Temp(path=path,  payload=payload, func=func, method=method)
mc.make_api()

# with open('..\\data\\api\\dept\dept1.yml', 'w', encoding='utf-8') as f:
# 	yml_content = """search_dept:
#   # - [ids,  query]
#   - [Required filds, DemoName, 0]
#   # - [All filds, DemoName, 0]
# """
# 	f.write(yml_content)